<?php
require 'check_form.lib.php';
$data=array(
    'username'=>'小明',
    'password'=>'123456',
    'email' => 'xiaoming@123.com',
);
$validate=array(
    'username'=>'checkUsername',
    'password'=>'checkPassword',
    'email'=>'checkEmail',
);
$error=array();
foreach($validate as $k=>$v){
    $result=$v($data[$k]);
    if($result !== true){
        $error[]=$result;
    }
}
if(empty($error)){
}else{
    require 'register_error_html.php';
}